﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CCCoLMCopyLocationOrientationCmd
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using System.Resources;
using System.Windows.Forms;
using Tecnomatix.Engineering;
using Tecnomatix.Engineering.Ui;


namespace DnProcessSimulateCommands;

[TxEngineeringCommandCategory]
[TxPowerEngineeringCommandCategory]
public class CCCoLMCopyLocationOrientationCmd : TxButtonCommand
{
  private bool m_dialogIsOpen;

  public CCCoLMCopyLocationOrientationCmd() => this.m_dialogIsOpen = false;

  public virtual void Execute(object cmdParams)
  {
    if (this.m_dialogIsOpen)
      return;
    Cursor current = Cursor.Current;
    Cursor.Current = Cursors.WaitCursor;
    CCUiLMCopyLocationOrientationDlg locationOrientationDlg = new CCUiLMCopyLocationOrientationDlg(this);
    ((Control) locationOrientationDlg).Show();
    locationOrientationDlg.InitializeDialog();
    Cursor.Current = current;
  }

  public virtual string Category
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("COPY_LOC_CATEGORY");
    }
  }

  public virtual string Name
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("COPY_LOC_NAME");
    }
  }

  public virtual string Bitmap
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("COPY_LOC_BITMAP");
    }
  }

  public virtual string Tooltip
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("COPY_LOC_TOOLTIP");
    }
  }

  public virtual string Description
  {
    get
    {
      return new ResourceManager("DnProcessSimulateCommands.StringTable", ((object) this).GetType().Assembly).GetString("COPY_LOC_DESCRIPTION");
    }
  }

  public virtual ITxImage Image
  {
    get => (ITxImage) TxImageManager.GetImageByKey("CopyLocationOrientation");
  }

  public void DialogIsOpen(bool dialogIsOpen)
  {
    this.m_dialogIsOpen = dialogIsOpen;
    if (this.m_dialogIsOpen)
      TxApplication.ActiveUndoManager.StartTransaction();
    else
      TxApplication.ActiveUndoManager.EndTransaction();
  }

  public virtual bool Connect() => true;

  public virtual bool Licensed => TxCommandLicenser.CopyLocationOrientationLicense;
}
